package com.chance.cc.crawler.development.command.node.pcauto;

import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.development.command.job.domain.pcauto.PcAutoForumInteractionCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.pcauto.PcAutoForumReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.pcauto.PcAutoForumReplyCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.node.CrawlerNodeCommand;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-01-15 13:17:26
 * @email okprog@sina.com
 */
public class PcAutoCrawlerNodeOperator {
    private static final String domain = "pcauto";
    private static final CrawlerNodeCommand crawlerNodeCommand = new CrawlerNodeCommand("192.168.1.215",9505);

    @Test
    public void killArticleCrawlerJob(){
        HttpPage httpPage = crawlerNodeCommand.killCrawler(PcAutoForumReplyCrawlerSchedulerJob.pcAutoScheduler(domain));
        System.out.println("Kill Job ：" + httpPage.getRawText());
    }

    @Test
    public void nodeStatus(){
        HttpPage httpPage = crawlerNodeCommand.nodeStatus();
        System.out.println(httpPage);
    }
}
